package book.Test;

import java.sql.SQLException;
import java.util.List;

import org.junit.Test;

import book.entity.Category;
import book.service.CategoryService;
import book.service.impl.CategoryServiceImpl;

public class TestCategoryService {

	CategoryService categoryService = new CategoryServiceImpl();	
	
	@Test
	public void getCategoryById() throws SQLException {
		
		Category category = categoryService.getCategory(1000);
		
		System.out.println(category);
		
	}
	
	@Test
	public void getCategoryList() throws SQLException {
		
		List<Category> categoryList = categoryService.getCategoryList();
		for (Category category : categoryList) {
			System.out.println(category);
		}
		
	}
}
